using System.Web.Security;
using Castle.MicroKernel.Registration;
using Castle.MicroKernel.SubSystems.Configuration;
using Castle.Windsor;
using Database.Repositories;
using Domain.Repositories;
using Mestedur.Models.Membership;

namespace Mestedur.Models.WindsorModules
{
    public class RepositoryInstaller : IWindsorInstaller
    {
        public void Install(IWindsorContainer container, IConfigurationStore store)
        {
            container.Register(Component.For<IUserRepository>().ImplementedBy<UserRepository>());
            container.Register(Component.For<IChapterRepository>().ImplementedBy<ChapterRepository>());
            container.Register(Component.For<IQuizRepository>().ImplementedBy<QuizRepository>());
            container.Register(Component.For<IQuestionRepository>().ImplementedBy<QuestionRepository>());
            container.Register(Component.For<IQuestionInQuizRepository>().ImplementedBy<QuestionInQuizRepository>());
            container.Register(Component.For<ITopicRepository>().ImplementedBy<TopicRepository>());
            container.Register(Component.For<ICourseRepository>().ImplementedBy<CourseRepository>());
            container.Register(Component.For<IAnswerRepository>().ImplementedBy<AnswerRepository>());
        }
    }
}
